/**
 * Created by zhangwenlei on 2017/4/12.
 */
ADF.model.TextAreaModel = function(){
    ADF.model.TextAreaModel.superclass.constructor.call(this);
};

ADF.model.TextAreaModel.PROPERTY_TEXT = "text";

COM.util.defineClass(ADF.model.TextAreaModel, ADF.model.BaseModel,{

    initModel: function() {
        ADF.model.TextAreaModel.superclass.initModel.call(this);
        this.addPropertyDescriptor(new ADF.propertyDescriptor.DefaultPropertyDescriptor(ADF.model.TextAreaModel.PROPERTY_TEXT, "", "", true, "文本"));
    },
    setText: function(text) {
        this.setPropertyValue(ADF.model.TextAreaModel.PROPERTY_TEXT, text);
    },
    getText: function() {
        return this.getPropertyValue(ADF.model.TextAreaModel.PROPERTY_TEXT);
    },

    _getModelType : function(){
        return "ADF.model.TextAreaModel";
    },
    _getName : function(){
        return 'textarea';  
    },

    fillSerializedJson : function(jsonObject){
        jsonObject[ADF.model.TextAreaModel.PROPERTY_TEXT]=this.getPropertyDescriptor(ADF.model.TextAreaModel.PROPERTY_TEXT).serialize();
    },

    _deserialize:function (jsonObject) {
        var newProp=null;

        newProp=new AGEF.PropertyDescriptor();
        newProp.deserialize(jsonObject[ADF.model.TextAreaModel.PROPERTY_TEXT]);
        this.propertyDescriptors.put(newProp.getName(),newProp);
    }
});